package com.xkdx.guangguang.presistence.attention;

import org.json.JSONArray;
import org.json.JSONObject;

import com.xkdx.guangguang.module.network.AbsModule;

public class DelBrandModule extends AbsModule {
	public boolean isDelSuccess;

	@Override
	public void parseData() throws Exception {
		backJson = (JSONArray) result;
		try {
			for (int i = 0; i < backJson.length(); i++) {
				jsonObj = (JSONObject) backJson.get(i);
				String sortOfAct = jsonObj.getString("Act");
				if (sortOfAct.equals("delAttentBrand")) {
					isDelSuccess = parseDelBrandAttent(jsonObj.getJSONObject("Content"));
				}

			}
		} catch (Exception e) {
			throw e;
		}

	}

	private boolean parseDelBrandAttent(JSONObject person) throws Exception {
		// TODO Auto-generated method stub

		try {
			JSONObject stut = (JSONObject) person.get("Result");
			String Status = stut.getString("Status");
			if (Status.equals("Success")) {
				return true;
			}
		} catch (Exception e) {
			throw e;
		}
		return false;
	}

}
